from utils.method_value import ElementLocation


class FirstPage:
    e = ElementLocation()
    """首页元素"""
    # e = ("xpath", "//button[contains(text(),\"跳过\")]")
    # 首页弹框元素
    SKIP_ELEMENT = {
        "method": "xpath",
        "value": "//button[contains(text(),\"跳过\")]",
    }
    # hell文件名称元素
    FILE_NAME_ELEMENT = {
        "method": "xpath",
        "value": "//p[@title=\"hello\"]",
    }
    # hell文件名称元素
    FILE_SEND_VALUE_ELEMENT = {
        "method": "xpath",
        "value": "//p[@title=\"hello\"]",
    }
    # 新建按钮
    CREATE_BUTTON_ELEMENT = {"method": "css", "value": "#js-search-wrapper button"}
    # 新建文档
    CREATE_DOM_ELEMENT = {"method": "css", "value": ".Menustyle__MenuItemText-sc-9di0nt-3"}
    # 收起我的文档
    UP_MY_DOM_ELEMENT = {
        "method": "css",
        "value": ".sc-htmbXw div"
    }
    # 使用文档弹框
    STUDY_ALTER_ELEMENT = {
        "method": "xpath",
        "value": "//header[contains(text(),\"使用\")]//button",
    }
    # 输入文档title
    # SEND_TITLE_ELEMENT = {
    #     "method": "css",
    #     "value": ".title[placeholder=\"无标题\"]",
    # }
    SEND_TITLE_ELEMENT = e.ele_css("//a[@class='j122']", "输入文档title")


